package cn.wolfcode.wolf2w.strategy.service;

import cn.wolfcode.wolf2w.strategy.api.domain.Strategy;
import cn.wolfcode.wolf2w.strategy.api.domain.StrategyContent;
import cn.wolfcode.wolf2w.strategy.query.StrategyQuery;
import cn.wolfcode.wolf2w.strategy.vo.StrategyVO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

/**
 * 攻略管理Service接口
 * 
 * @author dalang
 * @date 2023-11-23
 */
public interface IStrategyService extends IService<Strategy>{
    /**
    * 分页
    * @param qo
    * @return
    */
    IPage<Strategy> queryPage(StrategyQuery qo);

    Strategy queryById(Long id);

    List<Strategy> queryByCatalogId(Long cid);

    StrategyContent getContent(Long id);

    Strategy viewnumUp(Long sid);

    List<Strategy> viewnnumTop3(Long destId);

    Map<String, Object> viewnumIncr(Long sid);
    Map<String, Object> replynumIncr(Long sid);
    Map<String, Object> sharenumIncr(Long sid);

    Map<String, Object> favor(Long sid);

    String initStrategyHash(Long sid);

    Map<String,Object> thumbsup(Long sid);

    void updateCache();

    Boolean isUserFavor(Long sid, Long uid);
}
